##### My (demuredemeanor) bashrc sub source export script
# Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
# https://notabug.org/demure/dotfiles/
# legacy repo http://github.com/demure/dotfiles
# vim:set syntax=sh:

### Exports ### {{{
	### Universal Exports ### {{{
	export CLICOLOR="YES"				# Color 'ls', etc.
	export EDITOR=vim

		### History Settings ### {{{
		export HISTSIZE=10000			# Size of shells hist
		export HISTFILESIZE=10000		# Size of Hist file
		export HISTCONTROL=ignoreboth:erasedups
		export HISTTIMEFORMAT="%F %T "	# Adds time to history
		export HISTIGNORE='ls:bg:fg:history'	# Hist ignores exact match
		### End History Settings ### }}}
	### End Universal Exports ### }}}

	### Fortune At Login ### {{{
	## Tests for fortune, root, interactive shell, and dumb term
	if [[ `command -v fortune` && $UID != '0' && $- == *i* && $TERM != 'dumb' ]]; then
		fortune -a
	  else
		MISSING_ITEMS+="fortune, "
	fi
	### End Fortune ### }}}

	### Memo At Login ### {{{
	## Tests for memo, root, interactive shell, and dumb term
	# http://www.getmemo.org/index.html
	if [[ `command -v memo` && $UID != '0' && $- == *i* && $TERM != 'dumb' ]]; then
		memo -u 2>/dev/null
	  else
		MISSING_ITEMS+="memo, "
	fi
	### End Memo ### }}}

	### Taskwarrior At Login ### {{{
	## Tests for task, root, interactive shell, and dumb term
	# http://taskwarrior.org/
	if [[ `command -v task` && $UID != '0' && $- == *i* && $TERM != 'dumb' ]]; then
		task limit:5 2>/dev/null
	  else
		MISSING_ITEMS+="taskwarrior, "
	fi

	### End Taskwarrior ### }}}

	## Disabled due to death of GREP_OPTIONS
	#### Grep Options ### {{{
	### Colored Greps
	#if echo hello | grep --color=auto l >/dev/null 2>&1; then
		#GREP_OPTIONS+="--color=auto " GREP_COLOR='1;31'
	  #else
		#MISSING_ITEMS+="grep-colors, "
	#fi

	### Exclude annoying dirs
	### http://blog.sanctum.geek.nz/default-grep-options/
	#if echo hello | grep --exclude-dir=a l >/dev/null 2>&1; then
		#for PATTERN in .cvs .git .hg .svn; do
			#GREP_OPTIONS+="--exclude-dir=$PATTERN "
		#done
	  #else
		#MISSING_ITEMS+="grep-exclude, "
	#fi
	#export GREP_OPTIONS
	#### End Grep Options ### }}}

	### Nethack Conf ### {{{
	if [ -f $HOME/.nethackrc ]; then
		export NETHACKOPTIONS=~/.nethackrc
	  else
		MISSING_ITEMS+="nethackrc, "
	fi
	### End Nethack ### }}}

	### Slash'em Conf ### {{{
	if [ -f $HOME/.slashemrc ]; then
		export SLASHEMOPTIONS=~/.slashemrc
	  else
		MISSING_ITEMS+="slashemrc, "
	fi
	### End Slash'em ### }}}

	### TERM color ### {{{
	## Disabled, as forcing is kind of bad >_>
	## http://blog.sanctum.geek.nz/term-strings/
#	if [ -e /usr/share/terminfo/x/xterm-256color ]; then
#		export TERM='xterm-256color'
#	  else
#		export TERM='xterm-color'
#	fi
	### End TERM ### }}}
#### End Exports ### }}}

## Adding PATH junk
# evaluate if I can safely have MA's path higher...
# put this is a location
#export PATH=/usr/pkg/bin:/usr/local/bin:/usr/bin:/bin
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/pkg/bin:/usr/local/bin:/usr/local/sbin:${HOME}/projects/personal/scripts:${HOME}/bin:/usr/local/games:/usr/games
